@echo off


cd /d logistics-worker-distribution
start spaceLogisticsWorker.bat factory1
start spaceLogisticsWorker.bat factory2
start spaceLogisticsWorker.bat factory3
cd /d ..

call ping -n 3 localhost

cd /d tester-worker-distribution
start spaceTesterWorker.bat factory1 COMPLETENESS
call ping -n 2 localhost
start spaceTesterWorker.bat factory1 DEFECT
start spaceTesterWorker.bat factory2 COMPLETENESS
call ping -n 2 localhost
start spaceTesterWorker.bat factory2 DEFECT
start spaceTesterWorker.bat factory3 COMPLETENESS
call ping -n 2 localhost
start spaceTesterWorker.bat factory3 DEFECT
cd /d ..

call ping -n 3 localhost

cd /d producer-distribution
start spaceProducer.bat CPU 500 0 factory1
call ping -n 2 localhost
start spaceProducer.bat Mainboard 500 0 factory1
start spaceProducer.bat RAM 800 0 factory1
start spaceProducer.bat GraphicsCard 300 0 factory1

start spaceProducer.bat CPU 100 0 factory2
call ping -n 2 localhost
start spaceProducer.bat Mainboard 10 0 factory2
start spaceProducer.bat RAM 1800 0 factory2

start spaceProducer.bat CPU 2000 0 factory3
call ping -n 2 localhost
start spaceProducer.bat Mainboard 1000 0 factory3
start spaceProducer.bat RAM 500 0 factory3
start spaceProducer.bat GraphicsCard 1300 0 factory3
cd /d ..

echo Warten bis Producer fertig sind
pause
echo Starten der Assembly worker
cd /d assembly-worker-distribution
start spaceAssemblyWorker.bat factory1
start spaceAssemblyWorker.bat factory1
start spaceAssemblyWorker.bat factory2
start spaceAssemblyWorker.bat factory2
start spaceAssemblyWorker.bat factory3
start spaceAssemblyWorker.bat factory3
start spaceAssemblyWorker.bat factory3
start spaceAssemblyWorker.bat factory3
cd /d ..
echo Starten des Load Balancer
cd /d load-balancer-distribution
start runSpaceLoadBalancer.bat factory1 factory2 factory3
cd /d ..